<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="/css/main.css">
	<link rel="stylesheet" href="/css/font-awesome/css/font-awesome.css">
</head>
<body>
<div class="box">
	<h3>修缮记录信息管理</h3>
	<div class="actions">
		<div>
			<a class="btn btn-primary" href="/repair/toAdd">添加修缮记录信息</a>
		</div>
	</div>

	<table class="list">
		<tr>
			<th>详细地址</th>
			<th>修缮说明</th>
			<th>修缮时间</th>
			<th>修缮结果</th>
			<th>备注说明</th>
			<th>后勤人员</th>
			<th>人员电话</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${repairs.list}" var="flatrepair" varStatus="status">
			<tr>
				<td>${flatrepair.h_address}</td>
				<td>${flatrepair.fr_explain}</td>
				<td><fmt:formatDate value="${flatrepair.fr_time}" pattern="yyyy-MM-dd"/></td>
				<td>${flatrepair.fr_result}</td>
				<td>${flatrepair.fr_remark}</td>
				<td>${flatrepair.lo_name} </td>
				<td>${flatrepair.lo_phone}</td>
				<td>
					<a class="fa fa-info" title="详情" href="/repair/detail?id=${flatrepair.fr_id}"></a>
					&nbsp;&nbsp;
					<a class="fa fa-pencil" title="编辑" href="/repair/toEdit?id=${flatrepair.fr_id}"></a>
					&nbsp;&nbsp;
					<a class="fa fa-remove" title="删除" href="/repair/del?id=${flatrepair.fr_id}" onclick="confirmDelete(1)"></a>
				</td>
			</tr>
		</c:forEach>
	</table>
	<div class="pager-info">
		<div>共有 ${repairs.total} 条记录，第 ${repairs.pageNum }/${repairs.pages} 页 </div>
		<div>
			<ul class="pagination">
				<li class="paginate_button previous disabled }">
					<c:if test="${repairs.hasPreviousPage}">
						<a href="/repair/list?currentPage=${repairs.prePage}">上一页</a>
					</c:if>
				</li>
				<li class="paginate_button active"><a href="#">${repairs.pageNum}</a></li>
				<li class="paginate_button next disabled">
					<c:if test="${repairs.hasNextPage}">
						<a href="/repair/list?currentPage=${repairs.nextPage}">下一页</a>
					</c:if>
				</li>
			</ul>
		</div>
	</div>
</div>
<script src="js/jQuery.js"></script>
<script>
function confirmDelete(id){
	if (confirm("确定要删除码？")) {
	}
	return false;
}
</script>
</body>
</html>